// JoinInfo.h: interface for the JoinInfo class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_JOININFO_H__0EB30839_44B2_4A7D_B68A_451D5E838929__INCLUDED_)
#define AFX_JOININFO_H__0EB30839_44B2_4A7D_B68A_451D5E838929__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "part.h"
class JointFunction;
class FunctionObject;
#include "FunctionStack.h"

class AFX_EXT_CLASS JointInfo  
{
public:
	JointInfo(ModelObject* pPart);
	virtual ~JointInfo();

public:
	INT GetUnJointNum();
	INT GetJointNum();
	JointFunction* GetFirst();
	JointFunction* GetNext();
	ModelObject* GetOwner(){
		return m_pPart;
	}

	JointFunction* GetJointPort(const AcGePoint3d& pt);
	JointFunction* GetJointPort(const CString& strPortID);
	AcGePoint3d GetPtInWCS(JointFunction* pFun);

	FreeField GetFreeField(JointFunction* pFun);
private:
	void ClearIterator();
	BOOL IsJointFunction(FunctionObject* pFunction);

private:
	ModelObject* m_pPart;
	INT m_nIndex;
	FunctionStack::Iterator* m_pIterator;
};

#endif // !defined(AFX_JOININFO_H__0EB30839_44B2_4A7D_B68A_451D5E838929__INCLUDED_)
